var mongoose = require('mongoose'),
	config   = require('./config');

module.exports = function(){
	mongoose.Promise = global.Promise;
	var db = mongoose.connect(config.mongodb, {useMongoClient: true});
	
	require('../models/member_users.js');
	require('../models/task_taskLists.js');
	require('../models/team_teamLists.js');
	require('../models/message_lists.js');
	
	return db;
}
